home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / recent / mcf4amrc.lha / MCF4AmIRC / Rexx / MCF_PING.AMIRX < prev    next >
Text File  |  1996-10-10  |  2KB  |  11 lines

  1. /* MCF_PING.AMIRX
  2. // $VER: MCF_PING.AMIRX 4.7 (11.10.96)
  3. \\ Written by Donald T. Becker (dtbecker@prolog.net) IRC: StarDustr
  4. // Please mail any bug reports/comments to the above address with a subject
  5. \\ header of MCF.AMIRX.
  6. //
  7. \\ ** What to do with this file?
  8. //  Put this script in Rexx:
  9. \\     It will be used by MCF.AMIRX.
  10. */
  11. ;OPTIONS RESULTS;parse arg MCFenv junk LUser junk;UUser=upper(LUser);address (MCFenv);xl=pos(".",MCFenv);Client=substr(MCFenv,xl+1);PNC="PNICK."||Client;PCC="PCOUNT."||Client;GNick=getclip(PNC);if GNick="" then call FirstNick();if 0 ~=pos(UUser,GNick) then signal NickGreet;GCount=getclip(PCC);if GCount="" then GCount=0;if ~open("Input","MCF:MCF.Pings",'R') then exit;GCount=GCount+1;do cnt=1 by 1 until eof("Input")|cnt=GCount;zx.cnt=readln("Input");end cnt;call close("Input");if cnt<GCount|zx.cnt="" then cnt=1;call setclip(PCC,cnt);xx=zx.cnt;signal SayGreet;FirstNick:;if ~open("Input","MCF:MCF.PNicks",'R') then return;xnt=0;do cnt=1 by 1 until eof("Input");xx=readln("Input");if xx="" then iterate;parse value xx with xnick.cnt xgreet.cnt;znick=upper(xnick.cnt);GNick=GNick znick;if znick=UUser then xnt=cnt;end cnt;call close("Input");call setclip(PNC,GNick);if xnt=0 then return;xx=strip(xgreet.xnt);signal SayGreet;NickGreet:;if ~open("Input","MCF:MCF.PNicks",'R') then exit;do cnt=1 by 1 until xnick=UUser|eof("Input");xx=readln("Input");parse value xx with xnick xmsg;xnick=upper(xnick);end cnt;if xnick ~=UUser then exit;xx=strip(xmsg);SayGreet:;if xx="" then exit;x2="";parse value xx with act trest;if upper(act)="/ME" then xx='01'x||"ACTION"||trest||'01'x;if upper(act)="/S" then;do;parse value trest with sfile trest;xx='01'x||"SOUND "||sfile||" ("||sfile||") "||'01'x;trest=strip(trest);if trest ~="" then;do;x2=trest;if upper(left(trest,3))="/ME" then;do;parse value trest with junk trest;x2='01'x||"ACTION"||trest||'01'x;end;end;end;xp=pos('%',xx);xx=xx||"   ";do while xp ~=0;yy=left(xx,xp-1);zz=upper(substr(xx,xp+1,1));select;when zz='N' then lit=LNick;when zz='U' then lit=LUser;otherwise lit="";end;xx=yy||lit||substr(xx,xp+2);xp=pos('%',xx,xp);end;xx=strip(xx);"RAW PRIVMSG "LUser" :"xx;if x2="" then exit;xx=strip(x2);xp=pos('%',xx);xx=xx||"   ";do while xp ~=0;yy=left(xx,xp-1);zz=upper(substr(xx,xp+1,1));select;when zz='N' then lit=LNick;when zz='U' then lit=LUser;otherwise lit="";end;xx=yy||lit||substr(xx,xp+2);xp=pos('%',xx,xp);end;xx=strip(xx);"RAW PRIVMSG "LUser" :"xx;exit